<?php
	class CompOverview extends AppModel
	{
		var $name = "Company";
		var $primaryKey = 'id'; 
		
		var $hasMany = array(
			'CompPerson'=>array(
			'className'=>'CompPerson',
			'conditions' => array("CompPerson.is_deleted = '0'"),
			'foreignKey'=>'cid'
			),
			'CompEconomic'=>array(
			'fields'=>'cid,general_income,prospect,net_profit,over_taxes,qcll,company_year',
			'className'=>'CompEconomic',
			'conditions' => array("CompEconomic.is_deleted = '0'"),
			'foreignKey'=>'cid'
			),
			'DevelopmentCost'=>array(
			'className'=>'DevelopmentCost',
			'conditions' => array("DevelopmentCost.is_deleted = '0'"),
			'foreignKey'=>'cid'
			),
			'CompanyPatent'=>array(
			'fields'=>'cid,type_id,state',
			'className'=>'CompanyPatent',
			'conditions' => array("CompanyPatent.is_deleted = '0'"),
			'foreignKey'=>'cid'
			),
			'CompTalent'=>array(
			'className'=>'CompTalent',
			'fields'=>'cid,type_id',
			'conditions' => array("CompTalent.is_deleted = '0'"),
			'foreignKey'=>'cid'
			),
		);
	}
?>
